<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['namespace' => 'API'], function () {
    // product resources
    Route::get('/product/list', 'ProductController@getList');
    Route::get('/product/search', 'ProductController@querySearch');
    Route::resource('product', 'ProductController');

    // brand resources
    Route::get('brand/all', 'BrandController@all');
    Route::get('brand/list', 'BrandController@getList');
    Route::resource('brand', 'BrandController');

    // category resources
    Route::get('category/all', 'CategoryController@all');
    Route::resource('category', 'CategoryController');

    Route::get("test", 'TestController@test');
});
